<!--
 * @Description: 你的代码我的心
 * @Author: GGB
 * @Date: 2021-12-27 14:31:48
 * @LastEditors: GGB
 * @LastEditTime: 2022-01-04 17:40:33
-->
<template>
  <div class="goods-item">
    <div class="avatar"><Avatar shape="square" size="large" :src="goods.goods_image" /></div>
    <div class="content">
      <span class="goods-name">{{ goods.goods_name }}</span>
      <span class="goods-price">￥{{ goods.goods_price }} <span class="goods-count">x1</span></span>
    </div>
  </div>
</template>

<script setup lang="ts">
  import { Avatar } from 'ant-design-vue';
  import { GoodsItemModel } from '/@/api/goods/model/goodsModel';
  defineProps<{
    goods: GoodsItemModel;
  }>();
</script>

<style lang="less" scoped>
  .goods-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    margin: 5px 0;

    .avatar {
      flex-shrink: 0;
    }

    .content {
      display: flex;
      flex-direction: column;
      // align-items: center;
      margin-left: 10px;
      align-items: flex-start;

      span {
        padding: 0;
        margin: 0;
        font-size: small;
      }

      .goods-price {
        color: red;
      }

      .goods-count {
        color: #666;
        margin-left: 5px;
      }
    }
  }
</style>
